﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using WindowsFormsApplication1.Logica;

namespace WindowsFormsApplication1.Presentacion
{
    public partial class Login : Form
    {
        public Login()
        {
            InitializeComponent();
        }

        private void b_ingresar_Click(object sender, EventArgs e)
        {
            bool validar = ManejoLogin.IngresoUsuario(tb_usuario.Text, tb_contraseña.Text);

            if (validar)
            {
               
                this.Hide();
                MessageBox.Show("El usuario es valido", "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Information);
                Editar form1 = new Editar();
                form1.Show();
            }
            else
            {
                MessageBox.Show("El usuario NO es valido", "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

        }

    }
}
